package com.ibm.testbed.script.adjust;

import org.eclipse.jdt.core.ElementChangedEvent;
import org.eclipse.jdt.core.IElementChangedListener;
import org.eclipse.jdt.core.dom.CompilationUnit;

public class TestbedElementChangeListener implements IElementChangedListener {

	@Override
	public void elementChanged(ElementChangedEvent event) {

		CompilationUnit cu = event.getDelta().getCompilationUnitAST();

		if (cu != null) {
			TestbedElementAdjustEvent testbedEvent = new TestbedElementAdjustEvent(
					cu);

			TestbedEventQueue.INSTANCE.addEvent(testbedEvent);
		}
	}

}
